<?php 
set_time_limit(0);
ini_set("memory_limit", "12M");
if(!isset($_SESSION)) 
{ 
session_start(); 
} 
include '../connection/connection.php';

	$inputfrom = $_REQUEST['inputfrom'];
	$input_hourfrom = $_REQUEST['input_hourfrom'];
	$input_munitefrom = $_REQUEST['input_munitefrom'];
	$input_secondfrom = $_REQUEST['input_secondfrom'];
	$inputto = $_REQUEST['inputto'];
	$input_hourto = $_REQUEST['input_hourto'];
	$input_muniteto = $_REQUEST['input_muniteto'];
	$input_secondto = $_REQUEST['input_secondto'];
	$s_monitor = $_REQUEST['re_monitor'];
	$re_camera = $_REQUEST['re_camera'];

if ($s_monitor==0) {
	$selectallcamenra = mysql_query("SELECT cf.id,cf.`name` FROM `configcamera` cf ORDER BY name",$connection);
}else{
	$selectallcamenra = mysql_query("Select co.id,co.`name` from configcamera co, favourite f where co.id=f.camera_ID and f.monitor_ID=".$s_monitor."  order by name",$connection);
}

				
    			while ($row_c = mysql_fetch_array($selectallcamenra)){
				 ?>
			 		<option value="<?=$row_c['id']?>"><?=$row_c['name']?></option>
			 	<?php  
    			}

mysql_close($connection);

?>  